3.147 \(\int \frac{A+B x}{a+b x} \, dx\)

Optimal. Leaf size=25 \[ \frac{(A b-a B) \log (a+b x)}{b^2}+\frac{B x}{b} \]

[Out]

(B*x)/b + ((A*b - a*B)*Log[a + b*x])/b^2

_______________________________________________________________________________________

Rubi [A]  time = 0.0445672, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077 \[ \frac{(A b-a B) \log (a+b x)}{b^2}+\frac{B x}{b} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/(a + b*x),x]

[Out]

(B*x)/b + ((A*b - a*B)*Log[a + b*x])/b^2

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{\int B\, dx}{b} + \frac{\left (A b - B a\right ) \log{\left (a + b x \right )}}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/(b*x+a),x)

[Out]

Integral(B, x)/b + (A*b - B*a)*log(a + b*x)/b**2

_______________________________________________________________________________________

Mathematica [A]  time = 0.0119094, size = 25, normalized size = 1. \[ \frac{(A b-a B) \log (a+b x)}{b^2}+\frac{B x}{b} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/(a + b*x),x]

[Out]

(B*x)/b + ((A*b - a*B)*Log[a + b*x])/b^2

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 32, normalized size = 1.3 \[{\frac{Bx}{b}}+{\frac{\ln \left ( bx+a \right ) A}{b}}-{\frac{\ln \left ( bx+a \right ) Ba}{{b}^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/(b*x+a),x)

[Out]

B*x/b+1/b*ln(b*x+a)*A-1/b^2*ln(b*x+a)*B*a

_______________________________________________________________________________________

Maxima [A]  time = 1.35108, size = 35, normalized size = 1.4 \[ \frac{B x}{b} - \frac{{\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(b*x + a),x, algorithm="maxima")

[Out]

B*x/b - (B*a - A*b)*log(b*x + a)/b^2

_______________________________________________________________________________________

Fricas [A]  time = 0.200627, size = 34, normalized size = 1.36 \[ \frac{B b x -{\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(b*x + a),x, algorithm="fricas")

[Out]

(B*b*x - (B*a - A*b)*log(b*x + a))/b^2

_______________________________________________________________________________________

Sympy [A]  time = 1.93576, size = 20, normalized size = 0.8 \[ \frac{B x}{b} - \frac{\left (- A b + B a\right ) \log{\left (a + b x \right )}}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/(b*x+a),x)

[Out]

B*x/b - (-A*b + B*a)*log(a + b*x)/b**2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.264301, size = 36, normalized size = 1.44 \[ \frac{B x}{b} - \frac{{\left (B a - A b\right )}{\rm ln}\left ({\left | b x + a \right |}\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(b*x + a),x, algorithm="giac")

[Out]

B*x/b - (B*a - A*b)*ln(abs(b*x + a))/b^2